import service from "../utils/request";

//账户名/手机号/邮箱 + 密码的登录方式
export function doLogin(data: any) {
    return service.post('/user/login', data)
}

//验证手机号码是否被注册过
export function doCheckPhone(data: any) {
    return service.post('/user/docheckphone', data)
}
//发送验证码
export function doSendmsgcode(data: any) {
    return service.post('/user/dosendmsgcode', data)
}
//验证短信验证码
export function doCheckcode(data: any) {
    return service.post('/user/docheckcode', data)
}
//注册
export function doFinishRegister(data: any) {
    return service.post('/user/dofinishregister', data)
}
//查看全部订单
export function getOrderlist(data: any) {
    return service.post('/user/orderlist', data)
}

//获取用户信息
export function getUserInfo(payload = {}) {
    return service.get('/user/info', { params: payload })
}
// 绑定用户名 
export function bindUsername(payload = {}) {
    return service.get('/user/bindusername', { params: payload })
}

//修改密码
export function updatePassword(payload = {}) {
    return service.get('/user/updatePassword', { params: payload })
}